From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:38 2006 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi@qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue Mar 28 18:25:38 2006 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue Mar 28 18:25:38 2006 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue Mar 28 18:25:38 2006 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:38 2006 Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:32 2006 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi@qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue Mar 28 20:17:32 2006 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue Mar 28 20:17:32 2006 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue Mar 28 20:17:32 2006 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:32 2006 Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi@qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue Mar 28 20:20:02 2006 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue Mar 28 20:20:02 2006 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- %ifarch %ix86 %define target_cpu i386 %endif %ifarch x86_64 %define target_cpu amd64 %endif Name: rxtx Version: 2.1 Release: 7r2%{?dist} Summary: RXTX Group: Development/Libraries License: LGPL URL: http://www.rxtx.org Source0: %{name}-%{version}-%{release}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description rxtx is an full implementation of java commapi which aims to support RS232 IEEE 1284, RS485, I2C and RawIO. This is a developers release. %prep %setup -q -n %{name}-%{version}-%{release} %build export THREADS_FLAG=native ./autogen.sh %configure \ LDFLAGS=-s make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/jre/lib/ext $RPM_BUILD_ROOT%{_jvmdir}/jre/lib/%{target_cpu} make RXTX_PATH=$RPM_BUILD_ROOT%{_jvmdir}/jre/lib/%{target_cpu} JHOME=$RPM_BUILD_ROOT%{_jvmdir}/jre/lib/ext install echo "Driver=gnu.io.RXTXCommDriver" > $RPM_BUILD_ROOT%{_jvmdir}/jre/lib/gnu.io.rxtx.properties %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO %{_jvmdir}/jre/lib/* %changelog * Sun Mar 26 2006 Malek Degachi - Rebuild for Fedora Core 4 and Core 5. * Sun Mar 21 2004 Willem Riede - adjust spec file to support rpmbuild by ordinary user in Fedora context. From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Tue Mar 28 20:20:20 2006 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed Mar 29 09:29:20 2006 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker@SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0001.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed Mar 29 18:03:01 2006 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker@SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed Mar 29 22:51:32 2006 Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi@qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu Mar 30 09:06:48 2006 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi@qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker@SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx@qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri Mar 31 18:00:56 2006 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Wed May 3 11:01:18 2006 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0001.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0002.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0002.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0001.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0003.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0003.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0002.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0004.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0004.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0003.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0005.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0005.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0004.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0006.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0006.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0005.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0007.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0007.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0006.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0008.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0008.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0007.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0009.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0009.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0008.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0010.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0010.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0009.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0011.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0011.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0010.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0012.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0012.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0011.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0013.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0013.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0012.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0014.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0014.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0013.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0015.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0015.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0014.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0016.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0016.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0015.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0017.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0017.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0016.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0018.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0018.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0017.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0019.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0019.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0018.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0020.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0020.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0019.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0021.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0021.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0020.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0022.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0022.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0021.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0023.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0023.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0022.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0024.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0024.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0023.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0025.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0025.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0024.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0026.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0026.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0025.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0027.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0027.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0026.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0028.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0028.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0027.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0029.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0029.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0028.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0030.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0030.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0029.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0031.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0031.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0030.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0032.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0032.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0031.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0033.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0033.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0032.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0034.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0034.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0033.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0035.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0035.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0034.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0036.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0036.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0035.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0037.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0037.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0036.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0038.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0038.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0037.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0039.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0039.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0038.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0040.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0040.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0039.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0041.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0041.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0040.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0042.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0042.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0041.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0043.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0043.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0042.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0044.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0044.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0043.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0045.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0045.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0044.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0046.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0046.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0045.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0047.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0047.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0046.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0048.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0048.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0047.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0049.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0049.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0048.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0050.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0050.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0049.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0051.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0051.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0050.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0052.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0052.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0051.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0053.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0053.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0052.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0054.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0054.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0053.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0055.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0055.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0054.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0056.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0056.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0055.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0057.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0057.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0056.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0058.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0058.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0057.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0059.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0059.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0058.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0060.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0060.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0059.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0061.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0061.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0060.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0062.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0062.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0061.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0063.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0063.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0062.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0064.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0064.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0063.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0065.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0065.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0064.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0066.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0066.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0065.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0067.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0067.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0066.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0068.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0068.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0067.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0069.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0069.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0068.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0070.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0070.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0069.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0071.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0071.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0070.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0072.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0072.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0071.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0073.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0073.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0072.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0074.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0074.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0073.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0075.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0075.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0074.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0076.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0076.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0075.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0077.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0077.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0076.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0078.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0078.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0077.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0079.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0079.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0078.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0080.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0080.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0079.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0081.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0081.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0080.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0082.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0082.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0081.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0083.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0083.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0082.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0084.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0084.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0083.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0085.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0085.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0084.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0086.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0086.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0085.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0087.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0087.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0086.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0088.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0088.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0087.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0089.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0089.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0088.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0090.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0090.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0089.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0091.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0091.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0090.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0092.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0092.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0091.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0093.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0093.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0092.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0094.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0094.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0093.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0095.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0095.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0094.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0096.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0096.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0095.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0097.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0097.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0096.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0098.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0098.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0097.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0099.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0099.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0098.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0100.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0100.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0099.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0101.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0101.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0100.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0102.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0102.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0101.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0103.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0103.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0102.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0104.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0104.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0103.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0105.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0105.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0104.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0106.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0106.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0105.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0107.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0107.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0106.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0108.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0108.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0107.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0109.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0109.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0108.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0110.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0110.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0109.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0111.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0111.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0110.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0112.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0112.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0111.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0113.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0113.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0112.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0114.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0114.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0113.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0115.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0115.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0114.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0116.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0116.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0115.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0117.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0117.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0116.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0118.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0118.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0117.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0119.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0119.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0118.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0120.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0120.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0119.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0121.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0121.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0120.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0122.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0122.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0121.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0123.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0123.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0122.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0124.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0124.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0123.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0125.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0125.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0124.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0126.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0126.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0125.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0127.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0127.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0126.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0128.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0128.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0127.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0129.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0129.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0128.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0130.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0130.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0129.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0131.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0131.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0130.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0132.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0132.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0131.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0133.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0133.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0132.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0134.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0134.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0133.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0135.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0135.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0134.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0136.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0136.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0135.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0137.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0137.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0136.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0138.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0138.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0137.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0139.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0139.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0138.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0140.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0140.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0139.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0141.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0141.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0140.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0142.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0142.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0141.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0143.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0143.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0142.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0144.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0144.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0143.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0145.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0145.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0144.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0146.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0146.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0145.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0147.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0147.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0146.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0148.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0148.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0147.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0149.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0149.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0148.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0150.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0150.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0149.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0151.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0151.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0150.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0152.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0152.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0151.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0153.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0153.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0152.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0154.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0154.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0153.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0155.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0155.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0154.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0156.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0156.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0155.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0157.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0157.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0156.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0158.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0158.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0157.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0159.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0159.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0158.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0160.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0160.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0159.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0161.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0161.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0160.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0162.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0162.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0161.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0163.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0163.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0162.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0164.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0164.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0163.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0165.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0165.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0164.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0166.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0166.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0165.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0167.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0167.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A-C8CC-40B2-82A8-3241C68478ED@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > From malek.sd at free.fr Tue Mar 28 14:42:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:42:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429ADAA.9060308@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. From tjarvi at qbang.org Tue Mar 28 13:51:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 28 Mar 2006 13:51:01 -0700 (MST) Subject: [Rxtx] RXTX spec file for RPM In-Reply-To: <4429ADAA.9060308@free.fr> References: <4429ADAA.9060308@free.fr> Message-ID: On Tue, 28 Mar 2006, Malek SD wrote: > I send you this spec file which allows to create a RPM for Fedora 4, 5 > (x86, x86_64) with Java Sun. Thanks Malek We will be incuding this in the tarball next release. -- Trent Jarvi tjarvi at qbang.org From smontgomery at mediaspansoftware.com Tue Mar 28 08:19:28 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:19:28 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <2FDE368B-08EC-4129-8A98-FC1A15F23D73@mediaspansoftware.com> The summary says using more than one port causes a hang, but the description says the hand occurs when reading from one port and writing to another. What happens if you're only reading from the two ports? Just FYI: I use a Keyspan on my Mac and have successfully written to one port while reading from the other, as well as reading from two, using Rxtx 2.0.7 on 10.3.x. I'm pretty sure I've tried 1 read & 1 write on 10.4.x, too, but I'll double check. I realize there's a big difference between 2.0.7 and 2.1.7, just providing a baseline of sorts. On Mar 27, 2006, at 5:04 PM, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From malek.sd at free.fr Tue Mar 28 14:32:02 2006 From: malek.sd at free.fr (Malek SD) Date: Tue, 28 Mar 2006 23:32:02 +0200 Subject: [Rxtx] RXTX spec file for RPM Message-ID: <4429AB52.5080208@free.fr> I send you this spec file which allows to create a RPM for Fedora 4, 5 (x86, x86_64) with Java Sun. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rxtx.spec Url: http://mailman.qbang.org/pipermail/rxtx/attachments/20060328/7c291a8e/rxtx-0166.pl From lwensauer at atoss-csd.de Mon Mar 27 03:08:22 2006 From: lwensauer at atoss-csd.de (Ludwig Wensauer) Date: Mon, 27 Mar 2006 12:08:22 +0200 Subject: [Rxtx] Can't receive any response from modems Message-ID: <4427B996.3040709@atoss-csd.de> Hi Eugenia has already reported a bug: http://bugzilla.qbang.org/show_bug.cgi?id=41 I've got the simular problem and i made some analysis which you can read under the bug report. I've also sent a message to Trent, but unfortunatly he is far away from our earth ;) I've send him this message here: "... Hello, I've looked into the source code and i come to the following result: the function eventLoop is the key to our success, but must i change the SerialImpl.c or the SerialImpl.cpp? And Can I use the WaitCommEvent function? Or is it only a windows specific? My other problem is, until now I weren't able to install the required build environment (mingw,cygwin). btw a maybe helpfully link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp ..." I hope that someone could help me. Cheers Ludwig Wensauer From MBecker at shot.com Wed Mar 29 09:29:15 2006 From: MBecker at shot.com (Becker, Matt) Date: Wed, 29 Mar 2006 11:29:15 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Hello, I originally developed this program using comm 2.0 for windows and all of my code worked perfectly. I now have had to move this program to a CentOS 4.2 machine and needed to get a new comm package. So I followed the instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml about installing rxtx and comm, but the program will not work now. I've included the error I receive and the code it refers to. I have not seen anything like this on the internet or in the mail list. Could you please help? Thanks, Matthew R. Becker Software Engineer SHOT 7200 Highway 150 Greenville, IN 47124 (812) 923-9591, extension 206 (812) 923-2243 Fax mbecker at SHOT.com The error I get is: init: deps-jar: Compiling 1 source file to /common/Cryma5/build/classes compile: run: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver null at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive at com.sun.comm.SunrayInfo.isSessionActive(Native Method) at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at cryma5.TSerialPort.(TSerialPort.java:32) at cryma5.TCrystallographer.(TCrystallographer.java:33) at cryma5.MainForm.initAppComponents(MainForm.java:1049) at cryma5.MainForm.(MainForm.java:142) at cryma5.MainForm.main(MainForm.java:1040) Experimental: JNI_OnLoad called. Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) The code is: /* * TSerialPort.java * * Created on November 11, 2004, 9:39 PM */ package cryma5; import java.io.*; import java.util.*; import javax.comm.*; /** * * @author Bill */ public class TSerialPort { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "PM2\r\n"; //Set serial HUB into remote control mode. static SerialPort serialPort; static OutputStream outputStream; static InputStream inputStream; static BufferedReader inputReader; static boolean isOpen = false; private static Vector Listeners; /** Creates a new instance of TSerialPort */ public TSerialPort() { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1") || //windows (portId.getName().equals("/dev/ttyS0"))) { //Linux try { serialPort = (SerialPort) portId.open("TSerial", 2000); isOpen = true; SerialRead reader = new SerialRead(); System.out.println("TSerial:Using Port:"+portId.getName()); } catch (PortInUseException e) {System.out.println("TSerial:Port in use error:"+e);} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {System.out.println("TSerial:PortParam error:"+e);} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {System.out.println("TSerial:getOutputStream error:"+e);} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {System.out.println("TSerial:message error:"+e);} } } } } synchronized public static void Transmit(String data) { try { outputStream.write(data.getBytes()); // System.out.print("TSerial.Transmit:"+data); } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} } /** * Getter for property isOpen. * @return Value of property isOpen. */ public boolean isOpen() { return isOpen; } /** * Setter for property isOpen. * @param isOpen New value of property isOpen. */ public void setisOpen(boolean Open) { isOpen = Open; } public static void addTSerialListener(TSerialListener l) { if (Listeners == null) Listeners = new Vector(); Listeners.addElement(l); } public static void removeTSerialListener(TSerialListener l) { if (Listeners == null) return; Listeners.removeElement(l); } private void fireSerialISEvent(String rxdata) { if (Listeners == null) return; Vector l; synchronized (this) { l = (Vector)Listeners.clone(); //get a snapshot of listeners } //call each one for (Enumeration e = l.elements(); e.hasMoreElements();) { TSerialListener tl = (TSerialListener) e.nextElement(); tl.OnSerialSIReceive(rxdata); } } class SerialRead implements Runnable{ Thread readThread; public SerialRead() { try { inputStream = serialPort.getInputStream(); inputReader = new BufferedReader(new InputStreamReader(inputStream)); } catch (IOException e) {} readThread = new Thread(this); readThread.setName("SerialReader"); readThread.start(); } public void run() { String inputString; try { while (isOpen) { inputString = inputReader.readLine(); //If Input Status command like "4IS=01010101" if (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) { fireSerialISEvent(inputString.substring(4)); //Send data part } else { TLog.Println("<"+ inputString + ">"); } } } catch (IOException e) {} System.out.println("TSerial.SerialRead:Closed."); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060329/10279c3f/attachment-0168.html From tjarvi at qbang.org Wed Mar 29 18:02:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 18:02:58 -0700 (MST) Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null In-Reply-To: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> References: <6866B9FD91DFD411945C000102BEFE0E026924BB@EARTH> Message-ID: Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > From tjarvi at qbang.org Wed Mar 29 22:51:30 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 29 Mar 2006 22:51:30 -0700 (MST) Subject: [Rxtx] Changes in RXTX Leadership Message-ID: As mentioned earlier, I will be taking a position at The MathWorks. Some of my duties will revolve around RXTX. This should be a great thing for RXTX as I will be finding and fixing bugs in a more formal process. In theory, there could be conflicts of interest between my job and the RXTX community. I will be signing a fairly typical Employment Agreement which may limit my ability to make the best timely decisions for RXTX should a conflict come up. This is not the intent. Carving exceptions out in legal paperwork is a bit cumbersome. An easy way to solve this is to hand over primary decision making capability to someone we all trust. I can continue to help the project as always but should conflicts come up, the new maintainer would have the final say. I've asked Dr. Douglas Lyon if he would be interested in taking this position. He has kindly offered to accept should we all agree. This should not represent a new work load for Doug. His responsibility would be to have the final say in disputes. I think Doug would be excellent for this position. He has shown an active interest in the well being of the RXTX project and has been working hard to make RXTX easier to install for end users. Perhaps this will help his work too. It is the intent of The MathWorks and myself to do the right thing for the RXTX community. This is perhaps the cleanest solution which handles any potential conflicts. I'm rather excited about it. -- Trent Jarvi tjarvi at qbang.org From MBecker at shot.com Thu Mar 30 09:05:34 2006 From: MBecker at shot.com (Becker, Matt) Date: Thu, 30 Mar 2006 11:05:34 -0500 Subject: [Rxtx] java.io.IOException: Error instantiating class gnu.io. RXTXCommDri ver null Message-ID: <6866B9FD91DFD411945C000102BEFE0E026924C8@EARTH> Thanks for the help, I'll try it out. -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: Wednesday, March 29, 2006 8:03 PM To: RXTX Developers and Users Subject: Re: [Rxtx] java.io.IOException: Error instantiating class gnu.io.RXTXCommDri ver null Hi Matt " Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive \uffff\uffff\uffff\uffff\uffff\uffff\uffff at com.sun.comm.SunrayInfo.isSessionActive(Native Method) \uffff\uffff\uffff\uffff\uffff\uffff\uffff at "" rxtx 2.1 does not work with Sun's commapi. It is in package gnu.io and works like Sun's version 2.0. There is not way rxtx can work with Sun's Version 3.0 and that is supposed to be in the works to be fixed. Basically, the project had a change in leadership at Sun and the new guy didn't realize how their package was being used. Now they know and are fixing it but with limited resources. You can use rxtx 2.0 with Sun's version 2.0. Do not mix packages though. Either use gnu.io (rxtx 2.1) or javax.comm (rxtx 2.0, sun 2.0). Sun does have the old 2.0 CommAPI available for download in their archives. I don't have the link handy though. See also this email linked on the front page at rxtx.org: http://mailman.qbang.org/pipermail/rxtx/20051216/001960.html On Wed, 29 Mar 2006, Becker, Matt wrote: > Hello, > I originally developed this program using comm 2.0 for windows and > all of my code worked perfectly. I now have had to move this program to a > CentOS 4.2 machine and needed to get a new comm package. So I followed the > instructions on http://wass.homelinux.net/howtos/Comm_How-To.shtml > about installing rxtx > and comm, but the program will not work now. I've included the error I > receive and the code it refers to. I have not seen anything like this on > the internet or in the mail list. Could you please help? > Thanks, > Matthew R. Becker > Software Engineer > SHOT > 7200 Highway 150 > Greenville, IN 47124 > (812) 923-9591, extension 206 > (812) 923-2243 Fax > mbecker at SHOT.com > > > The error I get is: > > init: > deps-jar: > Compiling 1 source file to /common/Cryma5/build/classes > compile: > run: > Stable Library > ========================================= > > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver > null > at > javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:109) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Exception in thread "main" java.lang.UnsatisfiedLinkError: isSessionActive > at com.sun.comm.SunrayInfo.isSessionActive(Native Method) > at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155) > at > com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at cryma5.TSerialPort.(TSerialPort.java:32) > at cryma5.TCrystallographer.(TCrystallographer.java:33) > at cryma5.MainForm.initAppComponents(MainForm.java:1049) > at cryma5.MainForm.(MainForm.java:142) > at cryma5.MainForm.main(MainForm.java:1040) > Experimental: JNI_OnLoad called. > Java Result: 1 > BUILD SUCCESSFUL (total time: 2 seconds) > > The code is: > /* > * TSerialPort.java > * > * Created on November 11, 2004, 9:39 PM > */ > > package cryma5; > > import java.io.*; > import java.util.*; > import javax.comm.*; > > /** > * > * @author Bill > */ > public class TSerialPort > { > static Enumeration portList; > static CommPortIdentifier portId; > static String messageString = "PM2\r\n"; //Set serial HUB into remote > control mode. > static SerialPort serialPort; > static OutputStream outputStream; > static InputStream inputStream; > static BufferedReader inputReader; > static boolean isOpen = false; > private static Vector Listeners; > > /** Creates a new instance of TSerialPort */ > public TSerialPort() > { > portList = CommPortIdentifier.getPortIdentifiers(); > > while (portList.hasMoreElements()) { > portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { > if (portId.getName().equals("COM1") || //windows > (portId.getName().equals("/dev/ttyS0"))) { //Linux > try { > serialPort = (SerialPort) > portId.open("TSerial", 2000); > isOpen = true; > SerialRead reader = new SerialRead(); > System.out.println("TSerial:Using > Port:"+portId.getName()); > } catch (PortInUseException e) > {System.out.println("TSerial:Port in use error:"+e);} > try { > serialPort.setSerialPortParams(9600, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > } catch (UnsupportedCommOperationException e) > {System.out.println("TSerial:PortParam error:"+e);} > try { > outputStream = serialPort.getOutputStream(); > } catch (IOException e) > {System.out.println("TSerial:getOutputStream error:"+e);} > try { > outputStream.write(messageString.getBytes()); > } catch (IOException e) > {System.out.println("TSerial:message error:"+e);} > } > } > } > } > synchronized public static void Transmit(String data) > { > try { > outputStream.write(data.getBytes()); > // System.out.print("TSerial.Transmit:"+data); > } catch (Throwable e) {System.out.println("TSerial.Transmit:"+e);} > } > > /** > * Getter for property isOpen. > * @return Value of property isOpen. > */ > public boolean isOpen() { > return isOpen; > } > > /** > * Setter for property isOpen. > * @param isOpen New value of property isOpen. > */ > public void setisOpen(boolean Open) { > isOpen = Open; > } > > public static void addTSerialListener(TSerialListener l) > { > if (Listeners == null) Listeners = new Vector(); > Listeners.addElement(l); > } > > public static void removeTSerialListener(TSerialListener l) > { > if (Listeners == null) return; > Listeners.removeElement(l); > } > > private void fireSerialISEvent(String rxdata) > { > if (Listeners == null) return; > Vector l; > synchronized (this) { > l = (Vector)Listeners.clone(); //get a snapshot of listeners > } > //call each one > for (Enumeration e = l.elements(); e.hasMoreElements();) { > TSerialListener tl = (TSerialListener) e.nextElement(); > tl.OnSerialSIReceive(rxdata); > } > } > > class SerialRead implements Runnable{ > > Thread readThread; > > public SerialRead() { > try { > inputStream = serialPort.getInputStream(); > inputReader = new BufferedReader(new > InputStreamReader(inputStream)); > } catch (IOException e) {} > readThread = new Thread(this); > readThread.setName("SerialReader"); > readThread.start(); > } > > public void run() { > String inputString; > try { > while (isOpen) { > inputString = inputReader.readLine(); > //If Input Status command like "4IS=01010101" > if > (inputString.startsWith(TSerialCmd.SWITCH_IMP_CH+TSerialCmd.INPUT_STATUS)) > { > fireSerialISEvent(inputString.substring(4)); //Send > data part > } > else > { > TLog.Println("<"+ inputString + ">"); > } > } > } catch (IOException e) {} > System.out.println("TSerial.SerialRead:Closed."); > } > > > } > > } > > > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From lux at diesel-research.com Fri Mar 31 18:00:50 2006 From: lux at diesel-research.com (Kim Lux) Date: Fri, 31 Mar 2006 18:00:50 -0700 Subject: [Rxtx] Changes in RXTX Leadership In-Reply-To: References: Message-ID: <1143853250.16782.0.camel@zd7280> If you think he is good, Trent, I trust your judgement. On Wed, 2006-03-29 at 22:51 -0700, Trent Jarvi wrote: > > As mentioned earlier, I will be taking a position at The MathWorks. > Some of my duties will revolve around RXTX. This should be a great > thing for RXTX as I will be finding and fixing bugs in a more formal > process. > > In theory, there could be conflicts of interest between my job and the > RXTX community. > > I will be signing a fairly typical Employment Agreement which may limit my > ability to make the best timely decisions for RXTX should a conflict come > up. This is not the intent. Carving exceptions out in legal paperwork is > a bit cumbersome. > > An easy way to solve this is to hand over primary decision making > capability to someone we all trust. I can continue to help the project > as always but should conflicts come up, the new maintainer would have > the final say. > > I've asked Dr. Douglas Lyon if he would be interested in taking this > position. He has kindly offered to accept should we all agree. This > should not represent a new work load for Doug. His responsibility would > be to have the final say in disputes. I think Doug would be excellent > for this position. He has shown an active interest in the well being of > the RXTX project and has been working hard to make RXTX easier to > install for end users. Perhaps this will help his work too. > > It is the intent of The MathWorks and myself to do the right thing for > the RXTX community. This is perhaps the cleanest solution which handles > any potential conflicts. I'm rather excited about it. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Kim Lux, Diesel Research Inc. From Lars.Hennig at wow-portal.com Fri Mar 31 07:26:39 2006 From: Lars.Hennig at wow-portal.com (Lars.Hennig@wow-portal.com) Date: Fri, 31 Mar 2006 14:26:39 -0000 Subject: [Rxtx] Problems using Serial to USB Driver under Win32 Message-ID: Hello, I am connecting to a virtual serial port on a Win32 system. The real device behind this port is an USB device. Communication work fine until we disconnect the USB-cable from the PC while the communication is running. In this moment the communication hangs up and can not be recovered. The rxtx library enters the function nativeavailable and is not returning. In the cpp-source I found the following comment: result = PortArray[fd]->WaitForInput(); // WaitForInput() not the best choice, but all I could find. Could it be that this function is not returning when the virtual port disappears from the system when unplugging the USB-cable? Is the any way to avoid this behavior? Regards, Lars -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060331/7752bd75/attachment-0168.html From tjarvi at qbang.org Mon Mar 27 15:04:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 27 Mar 2006 15:04:16 -0700 (MST) Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: I'm probably not going to be able to resolve this. http://bugzilla.qbang.org/show_bug.cgi?id=43 Would a mail-list with just bugzilla reports be of use? -- Trent Jarvi tjarvi at qbang.org From joachim at buechse.de Tue Mar 28 01:27:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 28 Mar 2006 10:27:16 +0200 Subject: [Rxtx] Mac OS X specific bug in bugzilla In-Reply-To: References: Message-ID: <01156D40-66FA-4708-9B4B-87F595EEBF45@buechse.de> I can have a look into this but I need to get a second KeySpan adapter. As I dont want to buy one this could get a bit tricky... Tim, are you shell save? If so, can you please start your application from a shell (ie with a full java -cp ... command), provoke the hang, then open a second shell. Use "ps | grep java" to find the process id of your java application and then use "kill -3 " to send it a signal. Example joachim$ java -cp classes:resource:lib/joelib.jar:lib/RXTXcomm.jar Starter joachim$ ps | grep java 227 p1 S+ 0:01.52 java -cp classes:resource:lib/ joelib.jar:lib/RXTXcomm 229 p2 S+ 0:00.01 grep java joachim$ kill -3 227 This will provide a full thread-dump of the hanging java vm. Please post a copy of this dump on bugzilla. It can provide some first hints if the problem is inside RXTX (ie a deadlock) or in the driver. Regards, Joachim On 28.03.2006, at 00:04, Trent Jarvi wrote: > > I'm probably not going to be able to resolve this. > > http://bugzilla.qbang.org/show_bug.cgi?id=43 > > Would a mail-list with just bugzilla reports be of use? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From smontgomery at mediaspansoftware.com Tue Mar 28 08:25:20 2006 From: smontgomery at mediaspansoftware.com (Sean Montgomery) Date: Tue, 28 Mar 2006 10:25:20 -0500 Subject: [Rxtx] Mac OS X specific bug in bugzilla Message-ID: <8252B48A